package com.ruoyi.fts.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fts.mapper.FtsExpressCompanyMapper;
import com.ruoyi.fts.domain.FtsExpressCompany;
import com.ruoyi.fts.service.IFtsExpressCompanyService;

/**
 * 快递公司Service业务层处理
 *
 * @author lumberer
 * @date 2024-10-23
 */
@Service
public class FtsExpressCompanyServiceImpl extends ServiceImpl<FtsExpressCompanyMapper, FtsExpressCompany> implements IFtsExpressCompanyService {
    @Autowired
    private FtsExpressCompanyMapper ftsExpressCompanyMapper;

    /**
     * 查询快递公司
     *
     * @param id 快递公司主键
     * @return 快递公司
     */
    @Override
    public FtsExpressCompany selectFtsExpressCompanyById(Long id) {
        return ftsExpressCompanyMapper.selectFtsExpressCompanyById(id);
    }

    /**
     * 查询快递公司列表
     *
     * @param ftsExpressCompany 快递公司
     * @return 快递公司
     */
    @Override
    public List<FtsExpressCompany> selectFtsExpressCompanyList(FtsExpressCompany ftsExpressCompany) {
        return ftsExpressCompanyMapper.selectFtsExpressCompanyList(ftsExpressCompany);
    }

    /**
     * 新增快递公司
     *
     * @param ftsExpressCompany 快递公司
     * @return 结果
     */
    @Override
    public int insertFtsExpressCompany(FtsExpressCompany ftsExpressCompany) {
            return ftsExpressCompanyMapper.insert(ftsExpressCompany);
    }

    /**
     * 修改快递公司
     *
     * @param ftsExpressCompany 快递公司
     * @return 结果
     */
    @Override
    public int updateFtsExpressCompany(FtsExpressCompany ftsExpressCompany) {
        return ftsExpressCompanyMapper.updateById(ftsExpressCompany);
    }

    /**
     * 批量删除快递公司
     *
     * @param ids 需要删除的快递公司主键
     * @return 结果
     */
    @Override
    public int deleteFtsExpressCompanyByIds(Long[] ids) {
        return ftsExpressCompanyMapper.deleteFtsExpressCompanyByIds(ids);
    }

    /**
     * 删除快递公司信息
     *
     * @param id 快递公司主键
     * @return 结果
     */
    @Override
    public int deleteFtsExpressCompanyById(Long id) {
        return ftsExpressCompanyMapper.deleteFtsExpressCompanyById(id);
    }
}